#include "sdkGlobal.h"
#include "platform_global.h"

typedef struct
{
    TransmitUnSaleOnlineFunc mTransmitOnlineFunc;
    TransShowPlatformFunc mTransShowFunc;
    RecordPlatformFunc mRecordPlatformFunc;
    TransmitDataPlatformFunc mTransmitDataPlatformFunc;
    InputAdminPasswordFunc mInputAdminPasswordFunc;
} platform_unsale_entity;

static platform_unsale_entity g_platform_unsale_entity;

void platform_unsale_init()
{
    memset(&g_platform_unsale_entity, 0x00, sizeof(platform_unsale_entity));
}

void platform_unsale_set_transmit_online_func(TransmitUnSaleOnlineFunc func)
{
    g_platform_unsale_entity.mTransmitOnlineFunc = func;
}

TransmitUnSaleOnlineFunc platform_unsale_get_transmit_online_func()
{
    return g_platform_unsale_entity.mTransmitOnlineFunc;
}

void platform_unsale_set_show_func(TransShowPlatformFunc *flowFunc)
{
    memcpy(&g_platform_unsale_entity.mTransShowFunc, flowFunc, sizeof(TransShowPlatformFunc));
}

TransShowPlatformFunc *platform_unsale_get_show_func()
{
    return &g_platform_unsale_entity.mTransShowFunc;
}

void platform_unsale_set_transmit_data_func(TransmitDataPlatformFunc *platformFunc)
{
    memcpy(&g_platform_unsale_entity.mTransmitDataPlatformFunc, platformFunc, sizeof(TransmitDataPlatformFunc));
}

TransmitDataPlatformFunc *platform_unsale_get_transmit_data_func()
{
    return &g_platform_unsale_entity.mTransmitDataPlatformFunc;
}

void platform_unsale_set_record_func(RecordPlatformFunc *platformFunc)
{
    memcpy(&g_platform_unsale_entity.mRecordPlatformFunc, platformFunc, sizeof(RecordPlatformFunc));
}

RecordPlatformFunc *platform_unsale_get_record_func()
{
    return &g_platform_unsale_entity.mRecordPlatformFunc;
}

void platform_unsale_set_input_admin_password_flow_func(InputAdminPasswordFunc platformFunc)
{
    g_platform_unsale_entity.mInputAdminPasswordFunc = platformFunc;
}

InputAdminPasswordFunc platform_unsale_get_input_admin_password_flow_func()
{
    return g_platform_unsale_entity.mInputAdminPasswordFunc;
}


